<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/templates/common/taglib.jsp"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>${title }</title>
    <link rel="stylesheet" href="${basePath}/static/bootstrap/css/bootstrap.css"/>
    <link href="${basePath}/static/css/basic.css" rel="stylesheet" type="text/css">
    <link href="${basePath}/static/css/login.css" rel="stylesheet" type="text/css">
    <link href="${basePath}/static/css/list.css" rel="stylesheet" type="text/css">
   <%--  <link rel="stylesheet" href="${basePath}/static/css/content_leftNav.css"/>
    <link rel="stylesheet" href="${basePath}/static/css/FrontControl.css"/>
     --%><script  type="text/javascript" src="${basePath}/static/js/jquery.min.js"></script>
	<script  type="text/javascript" src="${basePath}/static/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="${basePath}/static/page/jqPaginator/jqPaginator.js"></script>
    
</head>
<body>
<!--头部-->
	<%@include file="/WEB-INF/templates/common/header.jsp"%>
	<!------导航条-->
	<%@include file="/WEB-INF/templates/common/navigation.jsp"%>

<!--内容部分-->
<div class="list_main lay_out" class="clearfix">
    <div class="list_DH">
        <%@include file="/WEB-INF/templates/common/qualityNav.jsp"%>
    </div>
    <div class="list_NR">
        <div class="loc">
            <h3 style="margin:0">归档统计</h3>
        </div>
        <div class="list_con_table">
            <div class="search_table">
                <ul class="clearfix" style="margin-bottom:0;">
<%--                     <li class="Label_1" style="width:12%">出院科室：&nbsp;</li>
                    <li class="Label_2" style="width:150px"><input class="input_box" type=""  name='onlyId' id='onlyId' value='${params.onlyId}' /></li> --%>
                	<li class="Label_1" >归档日期：&nbsp;</li>
                    <li class="Label_4" style="text-align:left;padding-left:3px;width:280px">
                    	<input class="input_box" style="width:120px;" type="text"  name='startTime' id='startTime' value='2017-05-01' onFocus="WdatePicker()" />
                    	<span>&nbsp;-&nbsp;</span>
                    	<input class="input_box" type="text" style="width:120px;"  name='endTime' id='endTime' value='2017-06-01' onFocus="WdatePicker()" />
                    </li>
                    <li class="Label_1" >迟送天数：&nbsp;</li>&nbsp;&nbsp;
                    <li class="Label_2" ><select style="width:120px"><option>2</option><option>3</option><option>7</option></select></li>
                    <li class="Label_5">
                        <div class="right" style="text-align:right">
                            <a onclick="searchQua()">查询</a>
                         
                        </div>
                    </li>
                  
                </ul>
            </div> 
             <table class="Search_tableList" cellpadding="0" cellspacing="0">
              	<tr id="totalRate">	 	
                    <td class="tdLabel_5" colspan="7">总记录数:10&nbsp;&nbsp;&nbsp;2日内归档率:98.7%&nbsp;&nbsp;&nbsp;<a href="${basePath}/statics/exportFileExcel">导出</a></td>
                   
                </tr>
                <tr>	 	
                    <td class="tdLabel_4">病案号</td>
                    <td class="tdLabel_4">识别码</td>
                    <td class="tdLabel_4">姓名</td>
                    <td class="tdLabel_4">出院科室</td>
                    <td class="tdLabel_4">出院日期</td>
                    <td class="tdLabel_4">归档日期 </td>
                     <td class="tdLabel_4">迟送天数 </td>
                </tr>
                
                <tbody id="tbody">
                
                	<tr>	 	
                    <td class="tdLabel_5">1-10525858</td>
                    <td class="tdLabel_5">6163543</td>
                    <td class="tdLabel_5">李靖环</td>
                    <td class="tdLabel_5">乳腺甲状腺外科病房[中心院区]</td>
                    <td class="tdLabel_5">2017-05-26</td>
                    <td class="tdLabel_5">2017-06-01 </td>
                     <td class="tdLabel_5">3 </td>
                </tr>
                <tr>	 	
                    <td class="tdLabel_5">1-10524647</td>
                    <td class="tdLabel_5">6277411</td>
                    <td class="tdLabel_5">陶书亮</td>
                    <td class="tdLabel_5">创伤急症外科病房[中心院区]</td>
                    <td class="tdLabel_5">2017-05-26</td>
                    <td class="tdLabel_5">2017-06-01 </td>
                     <td class="tdLabel_5">3 </td>
                </tr>
                <tr>	 	
                    <td class="tdLabel_5">1-10525900</td>
                    <td class="tdLabel_5">1100411</td>
                    <td class="tdLabel_5">朱远学</td>
                    <td class="tdLabel_5">泌尿外科病房[中心院区]</td>
                    <td class="tdLabel_5">2017-05-26</td>
                    <td class="tdLabel_5">2017-06-01 </td>
                     <td class="tdLabel_5">3 </td>
                </tr>
                <tr>	 	
                    <td class="tdLabel_5">2-10219285</td>
                    <td class="tdLabel_5">6253074</td>
                    <td class="tdLabel_5">王彦杰</td>
                    <td class="tdLabel_5">手足外科病房[中心院区]</td>
                    <td class="tdLabel_5">2017-05-25</td>
                    <td class="tdLabel_5">2017-05-31</td>
                     <td class="tdLabel_5">3 </td>
                </tr>
                <tr>	 	
                    <td class="tdLabel_5">1-10524967</td>
                    <td class="tdLabel_5">6277708</td>
                    <td class="tdLabel_5">刘成兰</td>
                    <td class="tdLabel_5">妇科西病房[中心院区]</td>
                    <td class="tdLabel_5">2017-05-25</td>
                    <td class="tdLabel_5">2017-05-31</td>
                     <td class="tdLabel_5">3 </td>
                </tr>
                <tr>	 	
                    <td class="tdLabel_5">2-10233475</td>
                    <td class="tdLabel_5">6276839</td>
                    <td class="tdLabel_5">丁李兵</td>
                    <td class="tdLabel_5">东院手足外科一病房[东院区]</td>
                    <td class="tdLabel_5">2017-05-25</td>
                    <td class="tdLabel_5">2017-05-31</td>
                     <td class="tdLabel_5">3 </td>
                </tr>
                <tr>	 	
                    <td class="tdLabel_5">1-10524005</td>
                    <td class="tdLabel_5">6276799</td>
                    <td class="tdLabel_5">刘西顺</td>
                    <td class="tdLabel_5">泌尿外科病房[中心院区]</td>
                    <td class="tdLabel_5">2017-05-25</td>
                    <td class="tdLabel_5">2017-05-31</td>
                     <td class="tdLabel_5">3 </td>
                </tr>
                <tr>	 	
                    <td class="tdLabel_5">1-10524873</td>
                    <td class="tdLabel_5">6259044</td>
                    <td class="tdLabel_5">樊英丽</td>
                    <td class="tdLabel_5">乳腺甲状腺外科病房[中心院区]</td>
                    <td class="tdLabel_5">2017-05-24</td>
                    <td class="tdLabel_5">2017-05-31</td>
                     <td class="tdLabel_5">4 </td>
                </tr>
                <tr>	 	
                    <td class="tdLabel_5">1-10522853</td>
                    <td class="tdLabel_5">6275686</td>
                    <td class="tdLabel_5">高树珍</td>
                    <td class="tdLabel_5">保健综合二病房（耳鼻咽喉科）[中心院区]</td>
                    <td class="tdLabel_5">2017-05-24</td>
                    <td class="tdLabel_5">2017-05-31</td>
                     <td class="tdLabel_5">4 </td>
                </tr>
                <tr>	 	
                    <td class="tdLabel_5">1-10524695</td>
                    <td class="tdLabel_5">6277461</td>
                    <td class="tdLabel_5">汪琦</td>
                    <td class="tdLabel_5">产科病房[中心院区]</td>
                    <td class="tdLabel_5">2017-05-22</td>
                    <td class="tdLabel_5">2017-05-26</td>
                     <td class="tdLabel_5">4 </td>
                </tr>

				
		
					
                
                </tbody>
            </table>
        </div>
        <div class="pageList">
            <ul class="pagination clearfix" id="page_plus"></ul>
            <div class="pagination">
                <div>总共：<b id="totalPage">0</b> 条信息    当前页是第 <b id="currentPage">0/0</b>　页</div>
            </div>
        </div>
    </div>
</div>
<!------页脚部分--------->
<%@include file="/WEB-INF/templates/common/footer.jsp"%>

<!--JS部分-->
<script type="text/javascript">
	$(function(){
		
	$("#tbody").hide();
	$("#totalRate").hide();
	
	})
	
	function searchQua(){
		$("#tbody").show();
		$("#totalRate").show();
	}

	function queryQua(pageNo,pageSize){
		var startTime=$("#startTime").val();
		var endTime=$("#endTime").val();
		var name=$("#name").val();
		var mrId=$("#mrId").val();
		var onlyId=$("#onlyId").val();
		var outDeptId=$("#outDeptId").val();
		
		if((startTime==null || startTime=="") && (endTime==null || endTime=='') && (name==null || name=='') && (mrId==null || mrId=='') && (onlyId==null || onlyId=='') && (outDeptId==null || outDeptId=='')){
			alert("请输入查询条件!");
			return;
		}
		
		$.ajax({
			type:"post",
			url:"${basePath}/quality/getMedQualityList",
			data:{startTime:startTime,endTime:endTime,name:name,mrId:mrId,onlyId:onlyId,outDeptId:outDeptId,pageNo:pageNo,pageSize:pageSize},
			success:function(data){
				var count=data.count;
				var quaList=data.quaList;
				if(quaList!=null && quaList!=""){
					page(pageNo+1,count);
					var html="";
					for(var i=0;i<quaList.length;i++){
						var obj=quaList[i];
						html+="<tr>"+
		                      "  <td class='tdLabel_5'>"+(parseInt(i)+1)+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.mrId+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.name+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.idNumber+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.deptName+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.level+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.point+"</td>"+
			                  "  <td class='tdLabel_5'><a class='int' firstGuid='"+obj.firstGuid+"'  onclick='updateMedQua(this)'>查看</a></td>"+
			                  "</tr>";
						
					}
					
					$("#tbody").html("").html(html);
				}else{
					alert("数据为空!");
					window.location.href="${basePath}/quality/findQuality";
				}
			}
		})
		
	}
	
	 function page(currentPage,totalCounts){
	    	//var totalCounts = 1000;
	        var pageSize = 1;
	        var visiblePages = 5;
	        //var currentPage = 1;
	        /* var totalPages = totalCounts%pageSize==0?(totalCounts/pageSize):(totalCounts/pageSize+1); */
	        var totalPages = Math.ceil(totalCounts/pageSize);
	        $('#page_plus').jqPaginator({

	            totalCounts: totalCounts,
	            pageSize:pageSize,
	            visiblePages: visiblePages,
	            currentPage: currentPage,

	            first:'<li class="first"><a href="javascript:void(0);">首页</a></li>',
	            prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
	            next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
	            last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
	            page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
	            onPageChange: function (num,type) {
	            	
	            	 if(type !='init'){
	                 
	            		 queryQua(num-1,pageSize);
	                 }
	            	
	                $("#totalPage").html(totalCounts);
	                $("#currentPage").html(num+"/"+totalPages);
	            }
	        });

	    }
	 
	 
	 function updateMedQua(obj){
		 var $this=$(obj);
		 var firstGuid=$this.attr("firstGuid");
		 window.location.href="${basePath}/quality/updateMedQua?folderName="+firstGuid;
	 }
</script>

</body>
</html>